package cn.good.yan.controller;

import cn.good.yan.apis.PayFeignApi;
import cn.good.yan.resp.ResultData;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

/**
 * 订单 - 演示：网关
 *
 * @author shengren.yan
 * @create 2022-04-06
 */
@RestController
@Slf4j
public class GateWayController {

    @Resource
    private PayFeignApi payFeignApi;

    @GetMapping(value = "/feign/g/get/{id}")
    public ResultData getById(@PathVariable("id") Integer id) {
        return payFeignApi.getById(id);
    }

    @GetMapping(value = "/feign/g/info")
    public ResultData<String> getGatewayInfo() {
        return payFeignApi.getGatewayInfo();
    }



}
